﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace AGrandVenture
{
    public class Message
    {
        public string message;
        public float messageAge;
        public bool active;
        public float aliveTimer = 0.0f;
        public Color colour;
             

        public Message(string message, Color fontColour)
        {
            this.message = message;
            colour = fontColour;
            messageAge = 0.0f;
            active = true;
            
        }

        public void Update(GameTime gameTime)
        {
            float elapsed = (float)gameTime.ElapsedGameTime.TotalSeconds;
            messageAge += elapsed;

            if (active)
            {
                if (messageAge > aliveTimer)
                {
                    active = false;
                }
            }
        }

        
    }
}
